package com.xls.resource.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.lzz.bottomencapsulation.popupwindow.CenterBaseDialog;
import com.xls.resource.R;

/***
 @package ${package}
 @filename ${filename}
 */
public class HintPW2 extends CenterBaseDialog implements View.OnClickListener {


    public TextView hTvTitle;
    public TextView hEtCarnum;

    TextView h2_tv_confirm;

    TextView h2_tv_cancel;

    public String title="提示";
    public String hint;

    public HintPW2(Context context) {
        super(context);
    }

    public HintPW2 setTitle(String title) {
        this.title=title;
        return this;
    }

    public HintPW2 setHint(String hint) {
        this.hint=hint;
        return this;
    }

    @Override
    protected int getView() {
        return R.layout.popu_hint2;
    }

    @Override
    protected void initView() {
        hTvTitle=findViewById(R.id.h2_tv_title);
        hEtCarnum=findViewById(R.id.h2_et_carnum);
        hTvTitle.setText(title);
        hEtCarnum.setText(hint);
        h2_tv_confirm= findViewById(R.id.h2_tv_confirm);
        h2_tv_confirm.setOnClickListener(this);
        h2_tv_cancel= findViewById(R.id.h2_tv_cancel);
        h2_tv_cancel.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.h2_tv_confirm) {
            dismiss();
        } else if (id == R.id.h2_tv_cancel) {
            dismiss();
        }
        if (onClickListener!=null){
            onClickListener.onClick(view);
        }
    }
}

